home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Mac OS USB DDK_v1.0.1 / Examples / USBModem / SerialShim.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-03  |  1.3 KB  |  73 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SerialShim.h
  3.  
  4.     Contains:    Public definitions for the Serial Shim
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Written by:    
  9.                 
  10.     Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     File Ownership:
  13.  
  14.         DRI:                xxx put dri here xxx
  15.  
  16.         Other Contact:        xxx put other contact here xxx
  17.  
  18.         Technology:            xxx put technology here xxx
  19.  
  20. */
  21.  
  22. #ifndef    _SERIALSHIM_
  23. #define    _SERIALSHIM_
  24.  
  25. // Shim definitions etc.
  26.  
  27. typedef UInt32    ShimRefNum;
  28. typedef UInt32    *IconPtr;
  29.  
  30. #define kInvalidRef        -1
  31.  
  32. // Shim interface structure
  33.  
  34. typedef    struct    SerialShimInterface
  35. {
  36.     StringPtr            DRVRInName;
  37.     StringPtr            DRVROutName;
  38.     StringPtr             CRMName;
  39.     IconPtr             CRMIcon;
  40.     UInt32                MaxSpeed;
  41.     UInt32                RefCon;
  42.     CFragConnectionID    ConnID;
  43.     
  44. } SerialShimInterface;
  45.  
  46. // Hardware abstarction codes
  47.  
  48. enum
  49. {
  50.     SerHAL_Initialize        =    0,
  51.     SerHAL_Terminate        =    1,
  52.     SerHAL_Read                =    2,
  53.     SerHAL_Write            =    3,
  54.     SerHAL_SetConfiguration    =    4,
  55.     SerHAL_SetInputBuffer    =    5,
  56.     SerHAL_SetFlowControl    =    6,
  57.     SerHAL_SetBreak            =    7,
  58.     SerHAL_SetDTERate        =    8,
  59.     SerHAL_SetDTR            =    9,
  60.     SerHAL_SetParity        =    10,
  61.     SerHAL_SetXOffFlag        =    11,
  62.     SerHAL_SendXOn            =    12,
  63.     SerHAL_SendXOff            =    13,
  64.     SerHAL_Miscellaneous    =    14,
  65.     SerHAL_GetBuffer        =    15,
  66.     SerHAL_GetStatus        =    16,
  67.     SerHAL_GetVersion        =    17,
  68.     SerHAL_ControlExtend    =    18,
  69.     SerHAL_StatusExtend        =    19
  70. };
  71.  
  72. #endif
  73.